<template>
  <view class="health-container">
    <!-- 顶部标题 -->
    <view class="header">
      <text class="back-btn" @click="goBack">‹</text>
      <text class="header-title">健康档案</text>
    </view>

    <!-- 用户信息 -->
    <view class="user-info">
      <view class="user-avatar">
        <image src="/static/images/default-avatar.png" class="avatar" />
      </view>
      <view class="user-details">
        <view class="user-name">李奶奶</view>
        <view class="user-tags">
          <text class="tag">脑高血压</text>
          <text class="tag">头痛</text>
        </view>
      </view>
    </view>

    <!-- 健康记录 -->
    <view class="health-records">
      <view class="section-title">健康记录</view>
      
      <view class="record-list">
        <view class="record-item">
          <view class="record-date">2024-04-14</view>
          <view class="record-content">
            <view class="record-title">图文问诊｜分科</view>
            <view class="record-desc">
              左侧胸腔底部，一年发作一次左右，一周左右恢复，医院检查报告显示尿酸偏高，而小便时放病
            </view>
          </view>
        </view>

        <view class="record-item">
          <view class="record-date">2024-04-14</view>
          <view class="record-content">
            <view class="record-title">医院问诊｜分科</view>
            <view class="record-desc">
              左侧胸腔底部，一年发作一次左右，一周左右恢复，医院检查报告显示尿酸偏高，而小便时放病
            </view>
          </view>
        </view>
      </view>
    </view>
  </view>
</template>

<script>
export default {
  name: 'HealthPage',
  data() {
    return {
      
    }
  },
  methods: {
    goBack() {
      uni.navigateBack()
    }
  }
}
</script>

<style lang="scss" scoped>
.health-container {
  min-height: 100vh;
  background: linear-gradient(135deg, #e6f7ff 0%, #f5f5f5 50%, #e6f7ff 100%);
}

// 顶部标题 - 增强版
.header {
  display: flex;
  align-items: center;
  padding: 48rpx 32rpx;
  background: linear-gradient(135deg, white 0%, #fafbfc 100%);
  position: relative;
  box-shadow: 0 4rpx 20rpx rgba(24,144,255,0.1);
  
  &::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4rpx;
    background: linear-gradient(90deg, transparent, #1890ff, transparent);
  }
}

.back-btn {
  font-size: 52rpx;
  color: #1890ff;
  position: absolute;
  left: 32rpx;
  width: 60rpx;
  height: 60rpx;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
  
  &:hover {
    background: rgba(24,144,255,0.1);
    transform: translateX(-4rpx);
  }
  
  &:active {
    background: rgba(24,144,255,0.2);
    transform: translateX(-2rpx) scale(0.95);
  }
}

.header-title {
  flex: 1;
  text-align: center;
  font-size: 40rpx;
  font-weight: 700;
  color: #333;
  position: relative;
  
  &::after {
    content: '💊';
    position: absolute;
    right: -40rpx;
    top: 50%;
    transform: translateY(-50%);
    font-size: 28rpx;
    opacity: 0.6;
  }
}

// 用户信息 - 增强版
.user-info {
  background: linear-gradient(135deg, white 0%, #e6f7ff 100%);
  padding: 40rpx 32rpx;
  margin: 20rpx 16rpx;
  border-radius: 24rpx;
  display: flex;
  align-items: center;
  box-shadow: 0 8rpx 24rpx rgba(24,144,255,0.15);
  border: 2rpx solid rgba(24,144,255,0.1);
  position: relative;
  
  &::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6rpx;
    background: linear-gradient(90deg, #1890ff, #40a9ff, #69c0ff);
    border-radius: 24rpx 24rpx 0 0;
  }
}

.user-avatar {
  width: 120rpx;
  height: 120rpx;
  margin-right: 32rpx;
  position: relative;
  
  &::before {
    content: '';
    position: absolute;
    top: -4rpx;
    left: -4rpx;
    right: -4rpx;
    bottom: -4rpx;
    background: linear-gradient(135deg, #1890ff, #40a9ff, #69c0ff);
    border-radius: 50%;
    z-index: 0;
  }
}

.avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 4rpx solid white;
  position: relative;
  z-index: 1;
  box-shadow: 0 4rpx 16rpx rgba(24,144,255,0.2);
}

.user-details {
  flex: 1;
}

.user-name {
  font-size: 40rpx;
  font-weight: 700;
  color: #333;
  margin-bottom: 20rpx;
  position: relative;
  
  &::after {
    content: '';
    position: absolute;
    bottom: -4rpx;
    left: 0;
    width: 50%;
    height: 3rpx;
    background: linear-gradient(90deg, #1890ff, #40a9ff);
    border-radius: 2rpx;
  }
}

.user-tags {
  display: flex;
  gap: 16rpx;
}

.tag {
  padding: 12rpx 20rpx;
  background: linear-gradient(135deg, #e6f7ff 0%, #f0f9ff 100%);
  color: #1890ff;
  border-radius: 24rpx;
  font-size: 26rpx;
  font-weight: 600;
  border: 2rpx solid rgba(24,144,255,0.2);
  box-shadow: 0 2rpx 8rpx rgba(24,144,255,0.2);
  position: relative;
  
  &::before {
    content: '●';
    margin-right: 8rpx;
    font-size: 16rpx;
    color: #1890ff;
  }
}

// 健康记录 - 增强版
.health-records {
  background: linear-gradient(135deg, white 0%, #e6f7ff 100%);
  padding: 40rpx 32rpx;
  margin: 20rpx 16rpx;
  border-radius: 24rpx;
  box-shadow: 0 8rpx 24rpx rgba(24,144,255,0.12);
  border: 1rpx solid rgba(24,144,255,0.1);
}

.section-title {
  font-size: 36rpx;
  font-weight: 700;
  color: #333;
  margin-bottom: 36rpx;
  position: relative;
  
  &::before {
    content: '📋';
    margin-right: 16rpx;
    font-size: 32rpx;
  }
  
  &::after {
    content: '';
    position: absolute;
    bottom: -8rpx;
    left: 0;
    width: 80rpx;
    height: 6rpx;
    background: linear-gradient(90deg, #1890ff, #40a9ff);
    border-radius: 3rpx;
  }
}

.record-list {
  
}

.record-item {
  padding: 32rpx 24rpx;
  border-bottom: 2rpx solid #f0f0f0;
  border-radius: 16rpx;
  margin-bottom: 16rpx;
  background: rgba(255,255,255,0.8);
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  
  &:last-child {
    border-bottom: none;
    margin-bottom: 0;
  }
  
  &:hover {
    background: rgba(24,144,255,0.05);
    transform: translateX(8rpx);
    box-shadow: 0 4rpx 16rpx rgba(24,144,255,0.15);
  }
  
  &::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: linear-gradient(135deg, #1890ff, #40a9ff);
    border-radius: 16rpx 0 0 16rpx;
    transition: width 0.3s ease;
  }
  
  &:hover::before {
    width: 6rpx;
  }
}

.record-date {
  font-size: 26rpx;
  color: #1890ff;
  margin-bottom: 20rpx;
  font-weight: 600;
  padding: 8rpx 16rpx;
  background: rgba(24,144,255,0.1);
  border-radius: 12rpx;
  display: inline-block;
  
  &::before {
    content: '📅';
    margin-right: 8rpx;
    font-size: 22rpx;
  }
}

.record-content {
  
}

.record-title {
  font-size: 32rpx;
  font-weight: 700;
  color: #333;
  margin-bottom: 16rpx;
  position: relative;
  
  &::before {
    content: '🏥';
    margin-right: 12rpx;
    font-size: 28rpx;
  }
}

.record-desc {
  font-size: 28rpx;
  color: #666;
  line-height: 1.6;
  background: rgba(24,144,255,0.05);
  padding: 20rpx;
  border-radius: 12rpx;
  border-left: 4rpx solid #1890ff;
  position: relative;
  
  &::before {
    content: '"';
    position: absolute;
    top: -8rpx;
    left: 12rpx;
    font-size: 40rpx;
    color: #1890ff;
    opacity: 0.3;
  }
  
  &::after {
    content: '"';
    position: absolute;
    bottom: -8rpx;
    right: 12rpx;
    font-size: 40rpx;
    color: #1890ff;
    opacity: 0.3;
  }
}
</style>